<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Andrey
 * Date: 24.01.12
 * Time: 21:48
 * To change this template use File | Settings | File Templates.
 */
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Задание #1</title>
</head>
<body>
<form method="post" action="/htdocs/index.php/company/add/">
    <dl>
        <dt><label>Название</label></dt>
        <dd><input name="name"/></dd>
        <dt><label>Краткое описание</label></dt>
        <dd><input name="short_desc"/></dd>
        <dt><label>Телефон</label></dt>
        <dd><input name="phone"/></dd>
        <dt><label>Email</label></dt>
        <dd><input name="email"/></dd>
        <dt><label>Регион</label></dt>
        <dd>
            <select name="location">
                <?php
                foreach($locationCollection as $location):
                    ?>
                    <option value="<?php echo $location->getId(); ?>"><?php echo $location->getData('title'); ?></option>
                    <?php
                endforeach;
                ?>
            </select>
        </dd>
        <dt><label>Категория</label></dt>
        <dd>
            <select  multiple size="4" name="cat[]">
                <?php
                foreach($categoryCollection as $category):
                    ?>
                    <option value="<?php echo $category->getId(); ?>"><?php echo $category->getData('title'); ?></option>
                    <?php
                endforeach;
                ?>
            </select>
        </dd>
        <dt>Рейтинг</dt>
        <dd>
            <select name="rating">
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
            </select>
        </dd>
    </dl>
    <input type="submit" value="send"/>
</form>
</body>
</html>